//
//  ZYCDutyRecordDetailNoDataView.m
//  ZDSC
//
//  Created by ZDTX on 2021/8/20.
//

#import "ZYCDutyRecordDetailNoDataView.h"

@interface ZYCDutyRecordDetailNoDataView ()

@property (nonatomic, strong) UIImageView *cImageView;
@property (nonatomic, strong) UILabel *title;
@end
@implementation ZYCDutyRecordDetailNoDataView

-(instancetype) initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self addSubview:self.cImageView];
        [self addSubview:self.title];

        [self.cImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self).offset(-50);
            make.centerX.equalTo(self);
            make.size.mas_equalTo(CGSizeMake(91.0f, 78.0f));
        }];
        
        [self.title mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.cImageView.mas_bottom).offset(20.f);
            make.centerX.offset(0.f);
        }];
        
    }
    return self;
}
-(UILabel *) title
{
    if (!_title) {
        _title = [[UILabel alloc] init];
        _title.textColor = [UIColor colorWithHexString:@"666666" alpha:1.0];
        _title.text = @"还未生成值班报告,无法查看~";
    }
    return _title;
}

-(UIImageView *) cImageView{
    if (!_cImageView) {
        _cImageView = [[UIImageView alloc] init];
        _cImageView.image = [UIImage imageNamed:@"nodata"];
        _cImageView.contentMode = UIViewContentModeScaleAspectFit;
    }
    return _cImageView;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
